import assessCheckApi from './api'
import { axios } from '@/utils/request'

// 流程列表-分页查询
export function list(params){
  return axios({
    url: assessCheckApi.list,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// 查询当前流程任务详情-通过当前流程任务id
export function queryJobByJobId(params){
  return axios({
    url: assessCheckApi.queryJobByJobId,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

// 办公用品申请管理流程保存
export function saveFlow(data){
  return axios({
    url: assessCheckApi.saveFlow,
    method:'post',
    data:{...data},
    url_2:'outside',
  })
}

// 办公用品申请管理流程提交
export function submitFlow(data){
  return axios({
    url: assessCheckApi.submitFlow,
    method:'post',
    data:{...data},
    url_2:'outside',
  })
}

// 修订提交
export function editFuntion(data){
    return axios({
        url: assessCheckApi.editFuntion,
        method:'put',
        data:{...data},
        url_2:'outside',
    })
}

// 流程监控-分页查询
export function flowJkPage(params){
  return axios({
    url: assessCheckApi.flowJkPage,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}
// --------------------------------

// 办公用品库存管理-分页列表查询
export function kcList(params){
  return axios({
    url: assessCheckApi.kcList,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}
// 办公用品申请管理流程
export function initBzFlow(data){
  return axios({
    url: assessCheckApi.initBzFlow,
    method:'post',
    data:{...data},
    url_2:'outside',
  })
}
// 通过物品编号拿到物品数量
export function getwpsl(params){
  return axios({
    url: assessCheckApi.getwpsl,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}
// 删除办公用品申请流程
export function deleteLgqsFlowJob(params){
  return axios({
    url: assessCheckApi.deleteLgqsFlowJob,
    method:'delete',
    params:{...params},
    url_2:'outside',
  })
}
//------------------
// 办公用品库存管理-通过id查询
export function queryById(params){
  return axios({
    url: assessCheckApi.queryById,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}

//--------------------
// 下载个人签名
export function getMoreUserSignLinkList(params){
    return axios({
        url: assessCheckApi.getMoreUserSignLinkList,
        method:'get' ,
        params:{...params},
        url_1:'outside',
        // responseType: 'arraybuffer',
    })
}

//
export function pidgetlchj(params){
    return axios({
        url: assessCheckApi.pidgetlchj,
        method:'get' ,
        params:{...params},
        url_2:'outside',
    })
}

export function officeSuppliesMlList(params){
    return axios({
        url: assessCheckApi.officeSuppliesMlList,
        method:'get' ,
        params:{...params},
        url_2:'outside',
    })
}

// 申请明细
export function selectOaid(params){
    return axios({
      url: assessCheckApi.selectOaid,
      method:'get',
      params:{...params},
      url_2:'outside',
    })
  }
//增加申请明细
export function addsqmx(data){
    return axios({
        url: assessCheckApi.addsqmx,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
  }
  // 删除申请明细
  export function delsqmx(params){
    return axios({
      url: assessCheckApi.delsqmx,
      method:'delete',
      params:{...params},
      url_2:'outside',
    })
  }
  //更新申请明细
  export function updatesqmx(params){
    return axios({
      url: assessCheckApi.updatesqmx,
      method:'get',
      params:{...params},
      url_2:'outside',
    })
}

export function updateYhr(data){
    return axios({
        url: assessCheckApi.updateYhr,
        method:'put',
        data:{...data},
        url_2:'outside',
    })
}

//归还办公用品
export function updategh(params){
    return axios({
      url: assessCheckApi.updategh,
      method:'get',
      params:{...params},
      url_2:'outside',
    })
}
